<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri='http://java.sun.com/jsp/jstl/functions' prefix='fn' %>
<c:url value="/resources/jQuery/jquery-1.7.2.min.js" var="jquery"/>
<c:url value="/resources/jQuery/jquery-ui-1.8.21.custom.min.js" var="jqueryUI"/>
<c:url value="/resources/css/cupertino/jquery-ui-1.8.21.custom.css" var="jQueryCSS" />


<script type="text/javascript" src="${jquery}" ></script>
<script type="text/javascript" src="${jqueryUI}" ></script>
<link type="text/css" href="${jQueryCSS}" rel="Stylesheet" />
<div id="changePasswordForm">
  <form:form method="post" commandName="commandPassword" action="../contact/changePassword.html?id=${contact.contactID}">
    <c:if test="${fn:length(errors) > 0}">
    <p style="font-color:#F00505"> Fix the following errors<br />
      <c:forEach items="${errors}" var="error" varStatus="loopVar">
        ${loopVar.index + 1}. ${error}<br />
      </c:forEach>
      </p>
    </c:if>
    <table>
    <tr>
        <td><form:label path="previousAttempt">Old Password</form:label></td>
        <td><form:input path="previousAttempt" /></td>
    </tr>
    <tr>
        <td><form:label path="firstAttempt">New Password</form:label></td>
        <td><form:input path="firstAttempt" /></td>
    </tr>
    <tr>
        <td><form:label path="secondAttempt">Confirm Password</form:label></td>
        <td><form:input path="secondAttempt" /></td>
    </tr>
    <tr>
        <td colspan="2">
            <input type="submit" value="Change"/>
        </td>
    </tr>
    </table> 
     
  </form:form>
</div>